package view.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.Student;
import controller.factory.AbstractFactory;

public class ActionShowAll implements Action {

	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		List<Student> students = AbstractFactory.getNewInstance()
				.getDAOStudent().getAll();
		request.getSession().setAttribute("students", students);
		return "/secured/showAll.jsp";
	}

}
